﻿<!--
Big thanks to http://mdb-blog.blogspot.ca/2010/11/bootstrapper-package-visual-studio-2010.html for the x86/x64 switches
-->

<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="Pilgrimage.Prerequisites">
  <RelatedProducts>
    <DependsOnProduct Code=".NETFramework,Version=v4.0" />
  </RelatedProducts>

  <PackageFiles>
    <PackageFile Name="NDP40-KB2544514-x86-x64.exe"/>
    <PackageFile Name="SqlLocalDB x86.msi"/>
    <PackageFile Name="SqlLocalDB x64.msi"/>
    <PackageFile Name="SharedManagementObjects_x86.msi"/>
    <PackageFile Name="SharedManagementObjects_x64.msi"/>
  </PackageFiles>

  <Commands>
    <!-- .Net 4.0.2 -->
    <Command PackageFile="NDP40-KB2544514-x86-x64.exe" Arguments="/passive /norestart">
      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1602" Result="Fail" String="CancelledInstall" />
        <DefaultExitCode Result="Fail" String="GeneralFailure"/>
      </ExitCodes>
    </Command>

    <!-- SQL LocalDB x86 -->
    <Command PackageFile="SqlLocalDB x86.msi" Arguments="/passive /norestart IACCEPTSQLLOCALDBLICENSETERMS=YES">
      <InstallConditions>
        <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1602" Result="Fail" String="CancelledInstall" />
        <DefaultExitCode Result="Fail" String="GeneralFailure"/>
      </ExitCodes>
    </Command>

    <!-- SQL LocalDB x64 -->
    <Command PackageFile="SqlLocalDB x64.msi" Arguments="/passive /norestart IACCEPTSQLLOCALDBLICENSETERMS=YES">
      <InstallConditions>
        <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1602" Result="Fail" String="CancelledInstall" />
        <DefaultExitCode Result="Fail" String="GeneralFailure"/>
      </ExitCodes>
    </Command>

    <!-- SMO x86 -->
    <Command PackageFile="SharedManagementObjects_x86.msi" Arguments="/passive /norestart">
      <InstallConditions>
        <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1602" Result="Fail" String="CancelledInstall" />
        <DefaultExitCode Result="Fail" String="GeneralFailure"/>
      </ExitCodes>
    </Command>

    <!-- SMO x64 -->
    <Command PackageFile="SharedManagementObjects_x64.msi" Arguments="/passive /norestart">
      <InstallConditions>
        <BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="amd64" />
      </InstallConditions>
      <ExitCodes>
        <ExitCode Value="0" Result="Success"/>
        <ExitCode Value="1602" Result="Fail" String="CancelledInstall" />
        <DefaultExitCode Result="Fail" String="GeneralFailure"/>
      </ExitCodes>
    </Command>
  </Commands>
</Product>